package com.service.impl;

import com.mapper.UserMapper;
import com.pojo.Employee;
import com.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    UserMapper userMapper;

    @Override
    public List<Employee> queryAll() {
       return userMapper.queryAll();
    }

    @Override
    public Employee queryById(int id) {
        return userMapper.queryById(id);
    }

    @Override
    public void addUser(Employee user) {
        userMapper.addUser(user);
    }

    @Override
    public void updataUser(Employee user) {
      userMapper.updataUser(user);
    }

    @Override
    public void delUser(int id) {
          userMapper.delUser(id);
    }
}
